package com.seven.restaurant.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.seven.restaurant.entity.po.OrderPO;
import com.seven.restaurant.entity.vo.OrderDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 订单 Mapper 接口
 * </p>
 *
 * @author BaiBan
 * @since 2022-07-19
 */
@Mapper
public interface OrderMapper extends BaseMapper<OrderPO> {

    /**
     * 自己写的分页查询, 难死我了tnnd
     */
    IPage<OrderDetailsVO> selectDetailsPage(Page<OrderDetailsVO> page, @Param("ew") Wrapper<OrderPO> queryWrapper);

    /**
     * 还是破多表查询, 但是我只要一个
     */
    OrderDetailsVO selectDetailsOne(Long id);
}
